package cn.kgc.service.impl;

import cn.kgc.dao.SupplierMapper;
import cn.kgc.pojo.Supplier;
import cn.kgc.service.SupplierService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class SupplierServiceImpl implements SupplierService {
    @Resource
    private SupplierMapper supplierMapper;

    @Override
    public List<Supplier> queryAllSupplier(String supplierId, String supplierName, Integer pageNum, Integer pageSize) {
        return supplierMapper.queryAllSupplier(supplierId, supplierName, pageNum, pageSize);
    }

    @Override
    public Integer addSupplier(Supplier supplier) {
        return supplierMapper.addSupplier(supplier);
    }

    @Override
    public Supplier queryByIdSupplier(Integer id) {
        return supplierMapper.queryByIdSupplier(id);
    }

    @Override
    public Integer updateSupplier(String supplierId) {
        return supplierMapper.updateSupplier(supplierId);
    }

    @Override
    public Integer deleteSupplierId(String supplierId) {
        return supplierMapper.deleteSupplierId(supplierId);
    }
}
